package com.example.sxt_practise.GOF23.flyweight;

/**
 * @author gaofeng
 * @date 2022年05月24日 20:06
 */
public class ConcreteCoordinate implements ChessFlyWeight{

    private String color ;

    public ConcreteCoordinate(String color) {
        this.color = color;
    }

    @Override
    public void setColor(String color) {
        this.color = color ;
    }

    @Override
    public String getColor() {
        return color;
    }

    @Override
    public void display(Coordinate coordinate) {
        System.out.println("旗子颜色" + color);
        System.out.println("棋子位置:" + coordinate.x + coordinate.y);
    }
}
